package com.user.entity;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

public class UserSeucrity extends User {
    private final Set<Role> roleSet;
    public UserSeucrity(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
        this.roleSet =(Set<Role>) authorities;
    }

}
